/*#include "UGShake.h"

namespace ugame {
    // Not really useful, but I like clean default constructors
    UGShake::UGShake() : _strength_x(0), _strength_y(0), _initial_x(0), _initial_y(0) {
    }
    
    UGShake* UGShake::actionWithDuration(float d, float strength) {
        // Call other construction method with twice the same strength
        return actionWithDuration( d, strength, strength );
    }
    
    UGShake* UGShake::actionWithDuration(float duration, float strength_x, float strength_y) {
        UGShake *p_action = new UGShake();
        p_action->initWithDuration(duration, strength_x, strength_y);
        p_action->autorelease();
        
        return p_action;
    }
    
    bool UGShake::initWithDuration(float duration, float strength_x, float strength_y) {
        if (ActionInterval::initWithDuration(duration)) {
            _strength_x = strength_x;
            _strength_y = strength_y;
            return true;
        }
        
        return false;
    }
    
    // Helper function. I included it here so that you can compile the whole file
    // it returns a random value between min and max included
    float fgRangeRand(float min, float max) {
        float rnd = ((float) rand() / (float) RAND_MAX);
        return rnd * (max - min) + min;
    }
    
    void UGShake::update(float time) {
        float randx = fgRangeRand(-_strength_x, _strength_x);
        float randy = fgRangeRand(-_strength_y, _strength_y);
        
        // Move the target to a shaked position
        _target->setPosition(Point(_initial_x, _initial_y)+Point(randx, randy));
    }
    
    void UGShake::startWithTarget(Node *pTarget) {
        ActionInterval::startWithTarget(pTarget);
        
        // Save the initial position
        _initial_x = pTarget->getPosition().x;
        _initial_y = pTarget->getPosition().y;
    }
    
    void UGShake::stop() {
        // Action is done, reset clip position
        _target->setPosition(Point(_initial_x, _initial_y));
        
        ActionInterval::stop();
    }
}*/